package com.jyxd.web.service.dictionary;

import com.jyxd.web.dao.dictionary.MonitorDictionaryDao;
import com.jyxd.web.data.dictionary.MonitorDictionary;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional
public class MonitorDictionaryService {

    private static Logger logger = LoggerFactory.getLogger(MonitorDictionaryService.class);
    @Autowired
    private MonitorDictionaryDao monitorDictionaryDao;


    public boolean insert(MonitorDictionary monitorDictionary) {
        return monitorDictionaryDao.insert(monitorDictionary);
    }

    public boolean update(MonitorDictionary monitorDictionary) {
        return monitorDictionaryDao.update(monitorDictionary);
    }

    public MonitorDictionary queryData(String id) {
        return monitorDictionaryDao.queryData(id);
    }

    public List<MonitorDictionary> queryList(Map<String, Object> map) {
        return monitorDictionaryDao.queryList(map);
    }

    public int queryNum(Map<String, Object> map) {
        return monitorDictionaryDao.queryNum(map);
    }

    /**
     * 床位安排--查询未分配的监护仪
     *
     * @param map
     * @return
     */
    public List<MonitorDictionary> getNoBedMonitorList(Map<String, Object> map) {
        return monitorDictionaryDao.getNoBedMonitorList(map);
    }

    /**
     * 查询正常状态的中央监护站
     *
     * @return
     */
    public List<MonitorDictionary> getCentralMonitorList() {
        return monitorDictionaryDao.getCentralMonitorList();
    }

    /**
     * 查询已分配的监护仪
     *
     * @param
     * @return
     */
    public List<MonitorDictionary> getBedMonitorList() {
        return monitorDictionaryDao.getBedMonitorList();
    }


}
